package com.ks.xcamera.adapter;

import android.content.Context;
import android.widget.TextView;

import com.ks.xcamera.R;
import com.ks.xcamera.base.ListBaseAdapter;
import com.ks.xcamera.base.SuperViewHolder;
import com.ks.xcamera.responseBean.ItemModel;

public class DataAdapter extends ListBaseAdapter<ItemModel> {

    public DataAdapter(Context context) {
        super(context);
    }

    @Override
    public int getLayoutId() {
        return R.layout.sample_item_text;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        ItemModel item = mDataList.get(position);

        TextView tvKuaiDi = holder.getView(R.id.tvKuaiDi);
        TextView tvNumber = holder.getView(R.id.tvNumber);
        TextView tvDate = holder.getView(R.id.tvDate);
        tvKuaiDi.setText(item.getExpress_company());
        tvNumber.setText(item.getExpress_num());
        tvDate.setText(item.getCreatetime());
    }
}
